package com.walterlife.dp.SingletonDP;

import java.io.Serializable;

// @file    SerializedSingleton.java
// @brief
// @author  walterzywei@gmail.com

public class SerializedSingleton implements Serializable {

    private static final long serialVersionUID = 6474866740300032131L;
    
    private SerializedSingleton() {} 

    private static class SingletonHelper {
        private static final SerializedSingleton instance = new SerializedSingleton();
    } 

    public static SerializedSingleton getInstance() {
        return SingletonHelper.instance;
    } 

    protected Object readResolve() {
        return getInstance();
    } 
}
